<div class="content-section implementation GridDemo clearfixes">
  <form class="form-horizontal" [formGroup]="newInspectionPlan"  >
    <p-panel >
      <p-header>
        <div class="ui-helper-clearfix">
          <button  pButton type="button"  label="返回" (click)="goBack()" [ngStyle]="{'width':'75px'}" ></button>
          <button [ngStyle]="{'float':'right'}" pButton  *ngFor="let optbutton of optButtons" (click)="approvedOption(optbutton.status)" label="{{optbutton.label}}" [disabled]="!newInspectionPlan.valid" ></button>

          <!--<button  pButton type="submit"  label="提交" *ngIf="viewState !== 'viewDetail'"></button>-->
          <!--<button  pButton type="submit" [ngStyle]="{'float':'right'}" label="保存" (click)="formSave()" label="保存" *ngIf="viewState !== 'viewDetail'"  ></button>-->
        </div>
      </p-header>
      <div class="ui-grid ui-grid-responsive ui-grid-pad ui-fluid" style="margin: 10px 0px">
        <div class="form-group ui-fluid  " >
          <label  class="col-sm-1 col-md-1 col-lg-1   control-label"><span></span>领用单号:</label>
          <div class="col-md-5 col-sm-5 ">
            <input  name="inspectionName" formControlName="sid" type="text" pInputText    readonly value="{{currentMaterial?.sid}}">
          </div>
          <label  class=" col-md-1 col-sm-1 control-label"><span>*</span>紧急程度:</label>
          <div class=" col-md-5 col-sm-5">
            <div class="ui-g-12 ui-fluid-no-padding">
              <input  name="inspectionName" formControlName="urgency" type="text" pInputText   readonly value="{{currentMaterial?.urgency}}">
            </div>
          </div>
        </div>
        <div class="form-group ui-fluid  " >
          <label  class="col-sm-1 col-md-1 col-lg-1   control-label"><span></span>领用人:</label>
          <div class="col-md-5 col-sm-5 ">

            <input  name="inspectionName" formControlName="name" type="text" pInputText    readonly value="{{currentMaterial?.creator}}" >
          </div>
          <label  class=" col-md-1 col-sm-1 control-label"><span></span>部门名称:</label>
          <div class=" col-md-5 col-sm-5">
            <div class="ui-g-12 ui-fluid-no-padding">
              <input type="text" pInputText formControlName="department" name="inspectiondepartment" placeholder="部门名称自动生成"
                     readonly class="cursor_not_allowed" [(ngModel)]="currentMaterial.org"  />
            </div>
          </div>
        </div>
        <div class="form-group ui-fluid  " >
          <label  class="col-sm-1 col-md-1 col-lg-1   control-label"><span></span>申请时间:</label>
          <div class="col-md-5 col-sm-5 ">
            <input formControlName="return_time" pInputText type="text"  name="people"    [(ngModel)]="currentMaterial.create_time" readonly/>
          </div>
          <label  class=" col-md-1 col-sm-1 control-label"><span>*</span>部门审批人:</label>
          <div class=" col-md-5 col-sm-5">
            <div class="ui-g-12 ui-fluid-no-padding">
              <input formControlName="people" pInputText type="text"  name="shenpi" [(ngModel)]="currentMaterial.approver"   class="no-border" readonly/>

            </div>
          </div>
        </div>
        <div class="form-group ui-fluid " >
          <label  class="col-md-1 col-sm-1 col-lg-1   control-label"><span>*</span>领用说明:</label>
          <div class="col-md-11 col-sm-11 ">
            <textarea pInputTextarea type="text"  formControlName="remarks" name="content" [(ngModel)]="currentMaterial.remarks" readonly></textarea>
          </div>
        </div>
        <div class="form-group ui-fluid " >
          <label  class="col-md-1 col-sm-1 col-lg-1   control-label"><span>*</span>审批意见:</label>
          <div class="col-md-11 col-sm-11 ">
            <textarea pInputTextarea type="text"  formControlName="approval_opinions" name="content"  [(ngModel)]="approvedModel['approve_remarks']" ></textarea>
            <div class="ui-message ui-messages-error ui-corner-all"  *ngIf="!newInspectionPlan.controls['approval_opinions'].valid&&(!newInspectionPlan.controls['approval_opinions'].untouched)" >
              <i class="fa fa-close"></i>
              审批意见必填
            </div>
          </div>
        </div>
      </div>
    </p-panel>
  </form>
  <label></label>
  <div class="ui-g">
    <div class="ui-g-12">
      <label>领用列表</label>
      <p-dataTable emptyMessage="没有数据" [value]="inventories" [lazy]="true" [rows]="10" [paginator]="true" [rowsPerPageOptions]="[5,10,20]"
                   [totalRecords]="totalRecords" (onLazyLoad)="loadCarsLazy($event)" [stacked]="stacked" [responsive]="true" >
        <p-column  *ngFor="let col of cols" field="{{col.field}}" header="{{col.header}}"></p-column>
      </p-dataTable>
      <div class="ui-grid-row margin-bottom-1vw">
        <div class="ui-grid-col-3">
        </div>
      </div>
    </div>
  </div>
</div>







